package com.wl.common.system.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.wl.common.mybatis.model.AbstractBaseDeleteModel;
import com.wl.common.core.constant.ConstantSystem;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * @author: wanglin
 * @date: 2023-09-18 周一
 * @Version: 1.0
 * @Description:
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity(name = SysResource.TABLE_NAME)
@Table(appliesTo = SysResource.TABLE_NAME, comment = "资源表")
@TableName(value = SysResource.TABLE_NAME)
public class SysResource extends AbstractBaseDeleteModel {
    public static final String TABLE_NAME = ConstantSystem.TABLE_PREFIX + "resource";

    @Column(columnDefinition = "varchar(32) comment '上级资源id'")
    private String parentId;
    @Column(columnDefinition = "varchar(50) comment '资源名称'", nullable = false)
    private String name;
    @Column(columnDefinition = "varchar(100) comment '资源URL'")
    private String url;
    @Column(columnDefinition = "varchar(200) comment '描述'")
    private String description;
    @Column(columnDefinition = "varchar(32) comment '资源类型ID,大模块的分类id'", nullable = false)
    private String categoryId;
}